import React from "react";
import Layout from "../../components/Layout";
import { useNavigate } from "react-router-dom";
type GatewayProps = {
  onBackButtonClick: () => void; // 定义一个用于处理返回按钮点击事件的回调函数类型
};

export default function Gateway() {

  let nav = useNavigate();
  const onBackButtonClick = () => {
    window.history.back();
  };
  return (<Layout>
    <div>
      <button onClick={() =>　nav("/CreateGateway")} className="btn btn-secondary h-4">新&nbsp;建</button>
    </div>
    <div className="overflow-x-auto">
      <table className="table">
        {/* head */}
        <thead>
        <tr>
          <th></th>
          <th>网关ID</th>
          <th>网关类型</th>
          <th>连接状态</th>
          <th>自动连接</th>
          <th>行情反馈</th>
          <th>网关描述</th>
          <th className="text-center">操作</th>
        </tr>
        </thead>
        <tbody>
        {/* row 1 */}
        <tr>
          <th>1</th>
          <td>Cy Ganderton</td>
          <td>Quality Control Specialist</td>
          <td>Blue</td>
          <td>Blue</td>
          <td>Blue</td>
          <td>Blue</td>
          <td className="text-center">
            <button className="btn btn-outline btn-success">连接</button>
            <button className="btn btn-outline btn-warning">修改</button>
            <button className="btn btn-outline btn-warning">复位</button>
            <button className="btn btn-outline btn-error">删除</button>
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </Layout>)
}